package com.cskaoyan.chapter0502.c050205;

import java.math.BigDecimal;
import java.util.ArrayList;

/**
 * @Author:WalterChan
 * @Decription:Test
 * @Date Created in 2024-05-29-12:44
 */
public class Test  {
    public static void main(String[] args) {
        Manager manager = new Manager();
        manager.setBonus(BigDecimal.TEN);
        Employee employee1 = new Employee();
        Employee employee2 = new Employee();
        Employee employee3 =employee1;
        System.out.println(employee1.equals(employee3));
        System.out.println(employee1.equals(employee1));
        System.out.println(employee2.equals(employee1));

        System.out.println(employee1);
        System.out.println(manager);

        ArrayList<Employee> list = new ArrayList<>();
        list.add(employee1);
        list.add(employee2);
        list.add(employee3);
        for (Employee employee : list) {
            employee.setName("123");
        }
    }
}
